home *** CD-ROM | disk | FTP | other *** search
- Path: usage.csd.unsw.oz.au!metro!munnari.oz.au!samsung!umich!terminator!dabo.citi.umich.edu!rees
- From: rees@dabo.citi.umich.edu (Jim Rees)
- Newsgroups: comp.sys.apollo
- Subject: Re: twm & apollo keys
- Message-ID: <510739db.cb12@dabo.citi.umich.edu>
- Date: 17 Apr 91 14:37:10 GMT
- References: <9104171236.AA00634@cml.unl.edu>
- Sender: usenet@terminator.cc.umich.edu (usenet news)
- Reply-To: rees@citi.umich.edu (Jim Rees)
- Organization: University of Michigan ITD
- Lines: 104
-
- In article <9104171236.AA00634@cml.unl.edu>, gah@CML.UNL.EDU (Glen A. Hansen) writes:
-
- 1) Has anyone had any success defining the Apollo DM keys (Pop,
- Again, Cut, etc.) to operate in twm, and/or in an xterm?
-
- I've had some limited success at this. Here are two entries from the FAQ
- file (available by ftp from dabo.citi.umich.edu) about X keys.
-
- Question:
-
- Are the VT100 PF1-PF4 keys defined in the Apollo version of xterm? If so,
- where are they? If not, can someone give me a hint how to define them (or
- how to redefine any key for that matter).
-
- -- John A. Breen
-
- Answer:
-
- The manual "Using the X Window System on Apollo Workstations" is the place
- to look for some of this -- it's a good summary, but not an exhaustive
- treatise on X. The answer to your question is that you will need to use the
- client "xmodmap" in order to simulate the keys which are not physically
- present on the Apollo keyboard (PF1-PF4 as an example).
-
- Since you are running in a "dm owns root" configuration, you'll need to take
- into account the "keyboard.config" file which tells XApollo "this list of
- keys doesn't exist for X, pass them through to the Apollo Display Manager".
- This is important because you don't want to remap keys for xterm which
- XApollo will not GIVE to xterm. See section 2.2.2 in the manual for a
- detailed discussion about the /usr/lib/X11/keyboard/keyboard.config file.
-
- Once you have picked a set of physical keys to emulate the PF keys, feed
- this to xmodmap using the physical keycode and the keysym name (from the
- include file /usr/include/X11/keysymdef.h).
-
- Example - you want to make the "AGAIN" key map to PF1. Looking at the
- output of "xmodmap -pk" you see that it is labeled "Redo" (which agrees with
- the entry in the keyboard.config file), and it is keycode value 158.
- Looking at the include file keysymdef.h, you see "#define XK_KP_F1 0xFF91"
- which is the entry for "keypad function key 1" - also known as PF1. The
- xmodmap client will take either a file entry or a command line remapping, so
- you could invoke it as < xmodmap -e "keycode 158 = KP_F1" > (the quotes are
- required on the command line) and the deed is done.
-
- If you don't have a copy of the manual, you can get one by using the order
- number "015213-A02". Hope that helps.
-
- -- weber_w@apollo.HP.COM (Walt Weber)
-
-
- Question: What else should I know about X keysyms?
-
- Answer:
-
- I suggest you put the following into /usr/X11/lib/XKeysymDB :
-
- LineDel: 1000FF00
- CharDel: 1000FF01
- Copy: 1000FF02
- Cut: 1000FF03
- Paste: 1000FF04
- Move: 1000FF05
- Grow: 1000FF06
- Cmd: 1000FF07
- Shell: 1000FF08
- LeftBar: 1000FF09
- RightBar: 1000FF0A
- LeftBox: 1000FF0B
- RightBox: 1000FF0C
- UpBox: 1000FF0D
- DownBox: 1000FF0E
- Pop: 1000FF0F
- Read: 1000FF10
- Edit: 1000FF11
- Save: 1000FF12
- Exit: 1000FF13
- Repeat: 1000FF14
- KP_parenleft: 1000FFA8
- KP_parenright: 1000FFA9
-
- This will let you refer to these keys by name. For example, the following
- resource will define scroll keys for your xterm. You can put this resource
- into your ~/.Xdefaults file and it will get loaded when you start an xterm.
-
- XTerm*VT100.Translations: #override \
- <KeyPress>UpBox : scroll-back(1,halfpage) \n \
- <KeyPress>DownBox : scroll-forw(1,halfpage) \n
-
- If you use emacs or motif, you may want to define a "meta" key (motif calls
- this an "alt" key, presumably because IBM has some pull at OSF). You can do
- this by creating a ~/.keymod file, an put this in it:
-
- clear mod1
- keycode 147 = Meta_L
- add mod1 = Meta_L
-
- This makes F0 your meta key. You can use whatever key you want as your
- meta, of course. Use xev to find out the keycode for the key you want.
- Then, when you log in, run this command (I put this in ~/.xsession, which
- gets run on my machine when I log in):
-
- /usr/bin/X11/xmodmap .keymod
-
- -- Jim Rees
-